package com.usian.admin.feign;

import com.usian.model.admin.dtos.NewsAuthDto;
import com.usian.model.common.dtos.ResponseResult;
import com.usian.model.media.pojos.WmNews;
import com.usian.model.media.vos.WmNewsVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient("leadnews-wemedia")
public interface MediaFeign {
    @GetMapping("/api/v1/news/one/{id}")
    ResponseResult findWmNewsById(@PathVariable("id") Long id);

    @GetMapping("/api/v1/news/update/articleId")
    Boolean updateArticleId(@RequestParam Long newsId,@RequestParam Long articleId);

    @GetMapping("/api/v1/news/update/status")
    Boolean updateStatus(@RequestParam Long newsId, @RequestParam Short status);

    @PostMapping("/api/v1/news/update/news")
    Boolean updateNews(@RequestBody WmNews wmNews);

    @GetMapping("/api/v1/news/findRelease")
    List<Long> findRelease();

    @PostMapping("/api/v1/news/findList/")
    ResponseResult findList(NewsAuthDto dto);

    @GetMapping("/api/v1/news/find_news_vo/{id}")
    WmNewsVo findWmNewsVo(@PathVariable("id") Long id);
}
